<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexIdxNumberInTaskWorkOrderTable extends AbstractMigration
{
    public function up()
    {
        $this->table('task_work_order')
            ->addIndex(['number'], ['unique' => true, 'name' => 'idx_number'])
            ->save();
    }

    public function down()
    {
        $this->table('task_work_order')
            ->removeIndexByName('idx_number')
            ->save();
    }


}
